echo "Arret du service turtlebot"
sudo echo " "
sudo service turtlebot stop&
sleep 4
killall -9 python


echo "Definition des adresses IP"
export ROS_MASTER_URI=http://192.168.1.100:11311
export ROS_HOSTNAME=192.168.1.100

  

echo ROS_MASTER_URI=$ROS_MASTER_URI
echo ROS_HOSTNAME=$ROS_HOSTNAME

echo "Definitions des variables d'environnement du workspace"
source /opt/ros/electric/setup.bash
ROS_ROOT=/opt/ros/electric/ros
PATH=$ROS_ROOT/bin:$PATH
PYTHONPATH=$ROS_ROOT/core/roslib/src:$PYTHONPATH
ROS_PACKAGE_PATH=~/ros_workspace:/opt/ros/electric/stacks:$ROS_PACKAGE_P

echo "Parametrage de linterface reseau"
roscd turtlebot_bringup/upstart/
sudo ./install.bash wlan0

sleep 1

echo "Reglage de la vitesse de transmission en 19200"
echo "Allumer le turtlebot et appuyez sur une touche pour continuer ..."
read touche
python ~/unicebot_root/old/turtlebot_scripts/setTurtle19200.py
echo
echo Faire Ctrl+C si le turtlebot n\'a pas aspire
read touche

echo "Redemarrage service turtlebot"
sudo service turtlebot start
sleep 10
 
sleep 8
echo "Activation du kinnect"
roslaunch turtlebot_bringup kinect.launch&

cd
